package cn.wizzer.app.user.modules.models;

import cn.wizzer.app.user.modules.models.enums.BankCardTypeEnum;
import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.integration.json4excel.annotation.J4EIgnore;

import java.io.Serializable;

/**
 * @author zl
 * @date 2020/8/25 16:01
 */
@Data
@Table("user_bank_card")
@Comment("用户银行卡")
public class UserBankCard extends BaseModel implements Serializable {

    @Column
    @Name
    @Comment("ID")
    @J4EIgnore
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;

    @Column
    @Comment("用户ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String userId;

    @Column
    @Comment("开户人")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String accountName;

    @Column
    @Comment("银行ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String bankLibId;

    @Column
    @Comment("银行卡号")
    @ColDefine(type = ColType.VARCHAR, width = 128)
    private String cardNumber;

    @Column
    @Comment("手机号前缀")
    @ColDefine(type = ColType.VARCHAR, width = 8)
    private String phonePrefix;

    @Column
    @Comment("手机号")
    @ColDefine(type = ColType.VARCHAR, width = 16)
    private String phone;


    @Column
    @Comment("印度银行IFSC码")
    @ColDefine(type = ColType.VARCHAR, width = 16)
    private String IFSCCODE;

    @Column
    @Comment("银行卡类型：普通银行卡、UPI")
    @ColDefine(type = ColType.VARCHAR, width = 8)
    private BankCardTypeEnum type;


    @Column
    @Comment("创建时间")
    @PrevInsert(els = @EL("$me.now()"))
    private Long ctAt;

    @Column
    @Comment("是否禁用0否1是")
    @ColDefine(type = ColType.BOOLEAN)
    private boolean disabled;

}
